package com.spzx.common.core.vo;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
 * 树形结构基础 vo类
 * @param <T>
 */
public class BaseTreeVo<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "节点id")
    private Long id;

    @Schema(description = "父分类id")
    private Long parentId;

    @Schema(description = "是否有子节点")
    private Boolean hasChildren;

    @Schema(description = "节点子集合")
    private List<T> children;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public List<T> getChildren() {
        return children;
    }

    public void setChildren(List<T> children) {
        this.children = children;
    }
}
